/*
 * common.h
 *
 *  Created on: Aug 12, 2014
 *      Author: burek
 */

#ifndef COMMON_H_
#define COMMON_H_

#include "types/integers.h"
#include "types/SMap.h"
#include "types/ByteStream.h"
#include "types/RString.h"
#include "glm/glm.hpp"

#include "portutil/common-codes.h"
#include "portutil/sockets.h"
#include "portutil/threading.h"
#include "portutil/timing.h"

#include "log/Log.h"
#include "util.h"
#include "stringutil.h"

#define INSTANCE_OF(A,B) (dynamic_cast<B>(A) != NULL)

#define PIf (3.14159265359f)
#define DOUBLE_PIf (6.28318530718f)
#define HALF_PIf (1.57079632679f)

#define RAD_TO_DEG (57.2957795130823208767981548141f)
#define DEG_TO_RAD (0.01745329251994329576923690f)

#define BYTE0(a) (a & 0xFF)
#define BYTE1(a) ((a >> 8) & 0xFF)
#define BYTE2(a) ((a >> 16) & 0xFF)
#define BYTE3(a) ((a >> 24) & 0xFF)

#define BITMASK_0 (0x00000001)
#define BITMASK_1 (0x00000002)
#define BITMASK_2 (0x00000004)
#define BITMASK_3 (0x00000008)
#define BITMASK_4 (0x00000010)
#define BITMASK_5 (0x00000020)
#define BITMASK_6 (0x00000040)
#define BITMASK_7 (0x00000080)

#include "util.h"

#endif /* COMMON_H_ */
